<?php


namespace Before\Facade;


class Client
{
    public static function main()
    {
        // 客户端直接创建各子系统
        $subsystem1 = new SubSystem1();
        $subsystem2 = new SubSystem2();
        $subsystem3 = new SubSystem3();

        // 执行各子系统业务操作
        $subsystem1->operation1();
        $subsystem2->operation2();
        $subsystem3->operation3();
    }
}


/**
 * 子系统角色
 */
class SubSystem1
{
    public function operation1(): void
    {
        echo 'subsystem1 operation', PHP_EOL;
    }
}
class SubSystem2
{
    public function operation2(): void
    {
        echo 'subsystem2 operation', PHP_EOL;
    }
}
class SubSystem3
{
    public function operation3(): void
    {
        echo 'subsystem3 operation', PHP_EOL;
    }
}


Client::main();
